package com.leyou.item.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.leyou.item.dto.CategoryDTO;
import com.leyou.item.entity.Category;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface CategoryMapper extends BaseMapper<Category> {

/*
    @Select("SELECT * " +
            "FROM tb_category " +
            "WHERE parent_id =#{pid}")
    List<Category> findCategoryById(@Param("pid") Long pid);*/


//    @Select("SELECT * " +
//            "FROM tb_category tc  LEFT JOIN tb_category_brand cb on tc.id =cb.category_id  " +
//            "WHERE cb.brand_id  =#{bid} ")
//    List<Category> listCategoryByBrandId(@Param("bid") Long bid);



  /*  @Select("SELECT * " +
            "FROM tb_category " +
            "WHERE id = #{id} ")
    Category selectCategoryById(@Param("id") Long id);*/
}
